package com.honour.service.interfaced.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;

import com.honour.service.interfaced.BootPageInManager;
import com.system.dao.DaoSupport;
import com.system.util.PageData;


/** 
 * 说明： 引导页表
 * 创建人：zhaozhenhua
 * 创建时间：2017-11-22
 * @version
 */
@Service("bootpageinService")
public class BootPageInService implements BootPageInManager{

	@Resource(name = "daoSupport")
	private DaoSupport dao;
	
	/**列表(全部)
	 * @param pd
	 * @throws Exception
	 */
	@SuppressWarnings("unchecked")
	public List<PageData> listAll(PageData pd)throws Exception{
		return (List<PageData>)dao.findForList("BootPageInMapper.listAll", pd);
	}

	/**
	 * 获取卡片分类的照片接口
	 */
	@Override
	public PageData getCardImgs(PageData pd) throws Exception {
		return (PageData) dao.findForObject("BootPageInMapper.getCardImgs", pd);
	}

	/**
	 * 分类随机显示6个卡号接口
	 */
	@SuppressWarnings("unchecked")
	@Override
	public List<PageData> getCardNumList(PageData pd) throws Exception {
		return (List<PageData>) dao.findForList("BootPageInMapper.getCardNumList", pd);
	}

	/**
	 * 分类随机显示12个卡号接口
	 */
	@SuppressWarnings("unchecked")
	@Override
	public List<PageData> getCardNumListWeb(PageData pd) throws Exception {
		return (List<PageData>) dao.findForList("BootPageInMapper.getCardNumListWeb", pd);
	}

    /**
     * 获得随机卡号
     */
	@Override
	public PageData getRandomCardNum(PageData pd) throws Exception {
		return (PageData) dao.findForObject("BootPageInMapper.getRandomCardNum", pd);
	}

	/**
	 * 将卡号变成已经使用
	 */
	@Override
	public void updRandomCardNum(PageData pd) throws Exception {
		 dao.update("BootPageInMapper.updCardNum", pd);
	}

	
	
}
